package com.example.test_app.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.PointF;
import android.text.Editable;
import android.text.Selection;
import android.text.Spannable;
import android.text.TextUtils;
import android.text.method.ArrowKeyMovementMethod;
import android.text.method.MovementMethod;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import androidx.appcompat.R;
import androidx.annotation.Nullable;

public class TextView2 extends androidx.appcompat.widget.AppCompatTextView{


    public TextView2(Context context) {
        super(context);
    }

    public TextView2(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, R.attr.editTextStyle);
    }

    public TextView2(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }





    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        Log.d("TAG", "onLayout: TextView2");
        super.onLayout(changed, left, top, right, bottom);

    }

    @Override
    public void draw(Canvas canvas) {
        Log.d("TAG", "draw: TextView2");
        super.draw(canvas);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        Log.d("TAG", "onMeasure: TextView2");
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        Log.d("TAG", "onDraw: TextView2");
        super.onDraw(canvas);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
        Log.d("TAG", "dispatchTouchEvent: ");
        super.dispatchTouchEvent(event);
        return true;
    }

    @Override
    public boolean dispatchKeyEvent(KeyEvent event) {
        Log.d("TAG", "dispatchKeyEvent: ");
        return super.dispatchKeyEvent(event);
    }

    @Override
    public float getZ() {
        return 10;
    }
}
